use crate::handlers::{show_run_form, new_course};

use actix_files as fs;
use actix_web::web;

pub fn app_config(cfg: &mut web::ServiceConfig) {
    cfg
        .service(
            web::scope("")
                .service(web::resource("/index").route(web::get().to(show_run_form)))
                .service(web::resource("/run").route(web::post().to(new_course)))
                .service(fs::Files::new("/", "./static").show_files_listing()),
        );

}